using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class ReportParamMap : EntityTypeConfiguration<ReportParam>
    {
        public ReportParamMap()
        {
            // Primary Key
            this.HasKey(t => t.id);

            // Properties
            this.Property(t => t.param1)
                .HasMaxLength(50);

            this.Property(t => t.param2)
                .HasMaxLength(50);

            this.Property(t => t.param3)
                .HasMaxLength(50);

            this.Property(t => t.param4)
                .HasMaxLength(50);

            this.Property(t => t.param5)
                .HasMaxLength(50);

            this.Property(t => t.param6)
                .HasMaxLength(50);

            this.Property(t => t.param7)
                .HasMaxLength(50);

            this.Property(t => t.param8)
                .HasMaxLength(50);

            this.Property(t => t.param9)
                .HasMaxLength(50);

            this.Property(t => t.param10)
                .HasMaxLength(50);

            this.Property(t => t.param11)
                .HasMaxLength(50);

            this.Property(t => t.param12)
                .HasMaxLength(50);

            this.Property(t => t.param13)
                .HasMaxLength(50);

            this.Property(t => t.param14)
                .HasMaxLength(50);

            this.Property(t => t.param15)
                .HasMaxLength(50);

            this.Property(t => t.param16)
                .HasMaxLength(50);

            this.Property(t => t.param17)
                .HasMaxLength(50);

            this.Property(t => t.param18)
                .HasMaxLength(50);

            this.Property(t => t.param19)
                .HasMaxLength(50);

            this.Property(t => t.param20)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("ReportParam");
            this.Property(t => t.id).HasColumnName("id");
            this.Property(t => t.param1).HasColumnName("param1");
            this.Property(t => t.param2).HasColumnName("param2");
            this.Property(t => t.param3).HasColumnName("param3");
            this.Property(t => t.param4).HasColumnName("param4");
            this.Property(t => t.param5).HasColumnName("param5");
            this.Property(t => t.param6).HasColumnName("param6");
            this.Property(t => t.param7).HasColumnName("param7");
            this.Property(t => t.param8).HasColumnName("param8");
            this.Property(t => t.param9).HasColumnName("param9");
            this.Property(t => t.param10).HasColumnName("param10");
            this.Property(t => t.param11).HasColumnName("param11");
            this.Property(t => t.param12).HasColumnName("param12");
            this.Property(t => t.param13).HasColumnName("param13");
            this.Property(t => t.param14).HasColumnName("param14");
            this.Property(t => t.param15).HasColumnName("param15");
            this.Property(t => t.param16).HasColumnName("param16");
            this.Property(t => t.param17).HasColumnName("param17");
            this.Property(t => t.param18).HasColumnName("param18");
            this.Property(t => t.param19).HasColumnName("param19");
            this.Property(t => t.param20).HasColumnName("param20");
            this.Property(t => t.param1d).HasColumnName("param1d");
            this.Property(t => t.param2d).HasColumnName("param2d");
            this.Property(t => t.Param3d).HasColumnName("Param3d");
            this.Property(t => t.Param4d).HasColumnName("Param4d");
        }
    }
}
